export function useLocation() {
  const selfLocation = window.__POWERED_BY_WUJIE__
    ? window.localStorage.getItem('preload') === 'true'
      ? window.$wujie?.location
      : location
    : location
  const parentLocation = window.__POWERED_BY_WUJIE__
    ? window.parent.location
    : 'wujie 不存在'

  return {
    selfLocation,
    parentLocation
  }
}
